var express = require('express');
var router = express.Router();
const fs = require('fs')

//返回图片
router.get('/', (req, res, next) => {
  var name = req.query.name;

  res.writeHead(200, { 'Content-Type': 'image/gif' });
  res.end(fs.readFileSync(__dirname + "/../upload-files/" + name));

});

module.exports = router;